#!/bin/bash

echo "DIRs"
find ./src -type d  | wc -l
echo "FILEs"
find ./src -type f  | wc -l
echo "GO"
find ./src -name "*.go" |xargs cat|grep -v ^$|wc -l
echo "CSS"
find ./static -name "*.css" |xargs cat|grep -v ^$|wc -l
echo "LESS"
find ./static -name "*.less" |xargs cat|grep -v ^$|wc -l
echo "JS"
find ./static -name "*.js" |xargs cat|grep -v ^$|wc -l
echo "PHP"
find . -name "*.php" |xargs cat|grep -v ^$|wc -l
echo "DETAILs"
find ./src -type f -name "*.go" | xargs wc -l | sort -n

dirs=`find ./src -type d |xargs`
for dir in $dirs; do
    echo ${dir}
    gofmt -tabwidth=4 -tabs=false -w=true ${dir}/*.go
done

rm -f ./bin/lesscreator

go build -ldflags "-w -s" -o ./bin/lesscreator ./src/main.go

./bin/lesscreator 

